<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Update News</title>
</head>

<body>

<?PHP
$con=mysqli_connect("localhost","root","","bd_news");
// Check connection
if (mysqli_connect_errno()) {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
}




$result = mysqli_query($con,"SELECT id_news, title FROM `news` ");

while($row = mysqli_fetch_array($result)) {
  echo "ID: ".$row['id_news'] . "  &nbsp   " . $row['title']."<br>";
}


mysqli_close($con);	
?>


<p>
<form name="update_form" action="update_news_form.php" method="post" visible="false">
<p>
ID_Upadte:<input type="text" name="id_update" maxlength="20" size="20"/>
</p>

<p>
<input type="submit" name="add_usr" value="Updatuj news"/>
</p>
</form>
</p>



</body>

</html>
